﻿using System;
using System.Web;

namespace SimpleScrum.Utils
{
    public class Client
    {
        public Guid ClientId { get; set; }
        public String ClientName { get; set; }
        public Guid CurrentOrganizationId { get; set; }
        public Guid CurrentProjectId { get; set; }
        public Guid DefaultProjectId { get; set; }

        public static Client Instance
        {
            get
            {
                var c = HttpContext.Current.Session["SimpleScrum.Utils.Client"] as Client;
                if (c == null)
                {
                    c = new Client();
                    HttpContext.Current.Session["SimpleScrum.Utils.Client"] = c;
                }
                return c;
            }
            set { HttpContext.Current.Session["SimpleScrum.Utils.Client"] = value; }
        }
    }
}